// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2005-4-29

#ifndef __GUARDCS_H_COMMON_GUARD__
#define __GUARDCS_H_COMMON_GUARD__

#pragma once

namespace JoyGuard
{

class ModCheck;
class ProcCheck;

//##ModelId=44CF17BE0399
class GuardCS
{
public:
	//##ModelId=44CF17BE039A
    HANDLE  m_waitEvent;
	//##ModelId=44CF17BE039C
    ModCheck*   m_modCheck;
	//##ModelId=44CF17BE03A1
    ProcCheck*  m_procCheck;

public:
	//##ModelId=44CF17BE03AB
    GuardCS();
	//##ModelId=44CF17BE03AC
    virtual ~GuardCS();

	//##ModelId=44CF17BE03AE
    bool Create(HANDLE hProcess, DWORD dwProcessId);
	//##ModelId=44CF17BE03B1
    void Close();

	//##ModelId=44CF17BE03B2
    bool Created() const
    {
        return m_modCheck != NULL;
    }
};

} // namespace JoyGuard

#endif  // __GUARDCS_H_COMMON_GUARD__
